﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="flights.aspx.vb" Inherits="Project2.flights" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Assignment/airportStyles.css" />
    <style type="text/css">
       
    </style>
</head>

<body>

    <div id="header"></div>
    
    <div id="outLeftCol"></div>

    <div id="inLeftCol">
  
        <div id="leftMenu">
            <center>
            <h2 style="font-size:x-larger; text-decoration: underline; ">~~Navigation~~</h2>
             <a href="customer.aspx" style="font-size: large"  >Customers</a><br /><br />
            <a href="flights.aspx" style="font-size: large"  >Flights</a><br /><br />
            <a href="search.aspx" style="font-size: large"  >Search Airports</a><br /><br />
            <a href="reservations.aspx" style="font-size: large"  >Reservations</a><br /><br />
            </center>
        </div>
    </div>

    <div id="centerContent">
    <form id="form3" runat="server">
        <div id="centerContentButtons">
        <p> Flight Menu Instructions: <br />1. Select a flight from the drop down list <br />2. Select the action you would like to take</p>
        <asp:Button ID="btnAddFlight" runat="server" Text="Add Flight" />   &nbsp &nbsp &nbsp
        <asp:Button ID="btnRemFlight" runat="server" Text="Remove Flight" /> &nbsp &nbsp &nbsp
        <asp:Button ID="btnModFlight" runat="server" Text="Modify Flight" />
        </div>
        
        <div id="contentArea">
            <asp:Label ID="lblFlightError" runat="server" Text="Select Flight #:" Visible="True"></asp:Label><br />
            <asp:DropDownList ID="ddFLights" runat="server" AppendDataBoundItems="true" AutoPostBack="true">
                <asp:ListItem>--Select Flight--</asp:ListItem>
            </asp:DropDownList><br /><br />
            <asp:GridView ID="gvFlights" runat="server" AutoGenerateColumns="False">
                <Columns>
                    <asp:BoundField DataField="FlightNumber" HeaderText="Flight #" />
                    <asp:BoundField DataField="OriginCode" HeaderText="Origin" />
                    <asp:BoundField DataField="DestinationCode" HeaderText="Destination" />
                    <asp:TemplateField HeaderText="Departure Time">
                    <ItemTemplate>
                    <asp:TextBox ID="txtDeparture" runat="server" Text='<%# Bind("DepartureTime") %>' Width="150px" Enabled="True"></asp:TextBox>
                    </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Distance" HeaderText="Distance" />
                    <asp:BoundField DataField="SeatsAvailable" HeaderText="Seats Available" />
                </Columns>
            </asp:GridView>
            <asp:label ID="lblAddDelFLight" Text="Fill out form below to add a flight" runat="server" Visible="false"></asp:label><br />
            <asp:Label ID="lblAddOrigin" Text="Origin Code:" Visible="false" runat="server"></asp:Label> &nbsp &nbsp &nbsp
            <asp:DropDownList ID="ddlOrigin" runat="server" AppendDataBoundItems="true" 
                AutoPostBack="true" Width="171px">
                <asp:ListItem>--Select Origin Code--</asp:ListItem>
            </asp:DropDownList>&nbsp &nbsp &nbsp 
            <asp:Button ID="btnSubmitFlight" Text="Submit" runat="server" Width="110px" /><br />
            <asp:Label ID="lblAddDest" runat="server" Visible="false" Text="Dest. Code:  "></asp:Label>&nbsp &nbsp &nbsp
            <asp:DropDownList ID="ddlDestCode" runat="server" AppendDataBoundItems="true" AutoPostBack="true" Width="175px">
                <asp:ListItem>--Select Destination Code--</asp:ListItem>
            </asp:DropDownList>&nbsp &nbsp &nbsp <asp:Button ID="btnCancelAddFlight" Text="Cancel" runat="server" Width="110px" /><br />
            <asp:Label ID="lblDepartTime" runat="server" Visible="false" Text="Departure Time: "></asp:Label>
            <asp:TextBox ID="txtDepartTime" runat="server" Visible="false" Width="155px" ></asp:TextBox>
            <asp:RequiredFieldValidator id="valDeptTimeReq" ControlToValidate="txtDepartTime" ErrorMessage="Departure time must not be empty" EnableClientScript="true" Display="Dynamic" Runat="server"/><br />
            <asp:Label ID="lblDistance" runat="server" Visible="false" Text="Distance:"></asp:Label> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
            <asp:TextBox ID="txtDistance" runat="server" Visible="false" Width="154px"></asp:TextBox>
            <asp:RequiredFieldValidator id="valDistance" ControlToValidate="txtDistance" ErrorMessage="Distance field must not be empty" EnableClientScript="true" Display="Dynamic" Runat="server"/><br />
            
            <asp:Label ID="lblSeats" runat="server" Visible="false" Text="Seats: "></asp:Label> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
            <asp:TextBox ID="txtSeats" runat="server" Visible="false" Width="154px"></asp:TextBox> 
            <asp:RequiredFieldValidator id="valSeats" ControlToValidate="txtSeats" ErrorMessage="Seats field must not be empty" EnableClientScript="true" Display="Dynamic" Runat="server"/><br />

        </div>


   </form>
    </div>

    <div id="inRightCol"></div>
    <div id="outRightCol"></div>

    <div id="footer"></div>

</body>
</html>
